/**
 * 
 */
package org.xlab.baseframework.web.data;

import com.vaadin.data.Item;
import com.vaadin.ui.Component;
import com.vaadin.ui.DefaultFieldFactory;
import com.vaadin.ui.Field;

/**
 * @author makubex
 * 
 */
public class LoginFormFieldFactory extends DefaultFieldFactory {

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = -8802608061080451537L;

	/**
	 * @see com.vaadin.ui.DefaultFieldFactory#createField(com.vaadin.data.Item,
	 *      java.lang.Object, com.vaadin.ui.Component)
	 */
	public Field createField(Item item, Object propertyId, Component uiContext) {
		Field f = super.createField(item, propertyId, uiContext);
		f.setRequired(true);
		f.setRequiredError("This is a required column! Please fill in some data!");
		f.setInvalidCommitted(false);
		return f;
	}

}
